#ifndef _CONNECTION_H_
#define _CONNECTION_H_

#include <winsock.h>
#include <Windows.h>
#include <stdio.h>
#include <stdlib.h>

#include "gobal.h"

#pragma comment(lib,"ws2_32.lib")

#define SMTP_SERVER "smtp.qq.com"
#define SMTP_PROT 25

extern SOCKET socketfd;

int connectToServer();
void releaseSocket(SOCKET socketfd);
int sendCmdAndGetRsp(const char* cmd);
void releaseResource();

#endif
